<!DOCTYPE html>
<html>
<head>
    <title> {$site_info.site_name|default=''}</title>
    <meta name="keywords" content="{$site_info.site_seo_keywords|default=''}"/>
    <meta name="description" content="{$site_info.site_seo_description|default=''}">
    <include file="public@head"/>
    <hook name="before_head_end"/>

</head>

<body class="page-index">
<div class="container">
    <include file="public@nav"/>

    <div class="contents">
        <!--活动通知/公告-->
        <div class="activity voluntTrain">
            <div class="title">
                <ul class="news-title">
                    <li class="title-item active"><a href="javascript:;">消防讲堂</a></li>
                    <li class="title-item"><a href="javascript:;">法规标准</a></li>
                    <li class="title-item"><a href="javascript:;">消防常识</a></li>
                    <li class="title-item"><a href="javascript:;">火灾案例</a></li>
                </ul>
            </div>
            <div class="box-cont voluntSty">
                <div class="act-forenotice show">
                    <div class="notice">
                        <foreach name="list_1" id="vo">
                            <div class="blockSty">
                                <a href="{:url('new/detail',['id'=>$vo.post.id])}" target="_blank">
                                    <div>
                                        <img src="/html/img/list.png" class="listImg">
                                        <div class="blockTitle">{$vo.post.post_title}</div>
                                        <div style="clear: both;"></div>
                                    </div>
                                    <div class="timeAdd">
                                        <i class="layui-icon layui-icon-log"></i> {$vo.post.published_time|date="Y/d/m H:i:s"}
                                        <!--<text class="jgSty"></text>-->
                                        <!--<i class="layui-icon layui-icon-location"></i> 山东省日照市阳光海岸社区-->
                                    </div>
                                </a>
                            </div>
                        </foreach>
                    </div>
                    <ul class="pagination">{$list_1->render()}</ul>
                </div>
                <div class="act-forenotice hidden">
                    <div class="notice">
                        <foreach name="list_2" id="vo">
                            <div class="blockSty">
                                <a href="{:url('new/detail',['id'=>$vo.post.id])}" target="_blank">
                                    <div>
                                        <img src="/html/img/list.png" class="listImg">
                                        <div class="blockTitle">{$vo.post.post_title}</div>
                                        <div style="clear: both;"></div>
                                    </div>
                                    <div class="timeAdd">
                                        <i class="layui-icon layui-icon-log">{$vo.post.published_time|date="Y/d/m H:i:s"}</i>
                                    </div>
                                </a>
                            </div>
                        </foreach>

                    </div>
                    <ul class="pagination">{$list_2->render()}</ul>
                </div>

                <div class="act-forenotice hidden">
                    <div class="notice">
                        <foreach name="list_3" id="vo">
                            <div class="blockSty">
                                <a href="{:url('new/detail',['id'=>$vo.post.id])}" target="_blank">
                                    <div>
                                        <img src="/html/img/list.png" class="listImg">
                                        <div class="blockTitle">{$vo.post.post_title}</div>
                                        <div style="clear: both;"></div>
                                    </div>
                                    <div class="timeAdd">
                                        <i class="layui-icon layui-icon-log"></i> {$vo.post.published_time|date="Y/d/m H:i:s"}
                                        <!--<text class="jgSty"></text>-->
                                        <!--<i class="layui-icon layui-icon-location"></i> 山东省日照市阳光海岸社区-->
                                    </div>
                                </a>
                            </div>
                        </foreach>
                    </div>
                    <ul class="pagination">{$list_3->render()}</ul>
                </div>
                <div class="act-forenotice hidden">
                    <div class="notice">
                        <foreach name="list_4" id="vo">
                            <div class="blockSty">
                                <a href="{:url('new/detail',['id'=>$vo.post.id])}" target="_blank">
                                    <div>
                                        <img src="/html/img/list.png" class="listImg">
                                        <div class="blockTitle">{$vo.post.post_title}</div>
                                        <div style="clear: both;"></div>
                                    </div>
                                    <div class="timeAdd">
                                        <i class="layui-icon layui-icon-log">{$vo.post.published_time|date="Y/d/m H:i:s"}</i>
                                    </div>
                                </a>
                            </div>
                        </foreach>

                    </div>
                    <ul class="pagination">{$list_4->render()}</ul>
                </div>

            </div>
        </div>
        <div style="clear: both;"></div>
    </div>


    <include file="public@footer"/>
    <!-- /container -->
    <include file="public@scripts"/>
    <script>
        (function($){
            "use strict";
            function bind_events(){
                $('.title .title-item').hover(function(e){
                    e.preventDefault();
                    var _index = $(this).index();
                    $(this).addClass('active').siblings().removeClass('active');
                    $('.activity .box-cont .act-forenotice').eq(_index).removeClass("hidden").addClass("show").siblings().removeClass("show").addClass("hidden");
                });
                $('.tab-ctrl-item').off("click").on("click",function(e){
                    e.preventDefault();
                    var _index = $(this).index();
                    $(this).addClass('active').siblings().removeClass('active');
                    $('.rank .tab-pannel div').eq(_index).removeClass("hidden").siblings().addClass("hidden");
                });
                $(".act-forenotice").on("click", "a[class=page-link]", function () {
                    var type_id=$(".title .active")[0].dataset.id
                    $.get($(this).attr('href')+'&type_id='+type_id, function (html) {
                        var str=''
                        $.each(html.list.data,function(k,v){
                            str+=' <div class="notice"><div class="blockSty"> <a href="newDetail.html"> <div> <img src="/html/img/list.png" class="listImg"> <div class="blockTitle">'+v.post.post_title+'</div> <div style="clear: both;"></div> </div> <div class="timeAdd"> <i class="layui-icon layui-icon-log"></i>'+v.post.published_time +'</div> </a> </div> </div>';
                        })
                        str+='<ul class="pagination">'+html.page+'</ul>'
                        $('.show').html(str)
                    });
                    return false;
                })
            }
            $(function(){
                bind_events();
                $('.hdtj ul li:last').css("border","none");
            })
        })(jQuery);

        //    layui
        layui.use(['laypage', 'layer','form','laydate'], function() {
            var laypage = layui.laypage
                    , layer = layui.layer
                    ,form = layui.form
                    ,laydate = layui.laydate;
//        分页
//            laypage.render({
//                elem: 'listOne'
//                ,count: 100
//                ,layout: ['prev', 'page', 'next', 'skip' ,'count']
//                ,prev: '<em>←</em>'
//                ,next: '<em>→</em>'
//                ,jump: function(obj){
//                    console.log(obj)
//                }
//            });
//            laypage.render({
//                elem: 'listTwo'
//                ,count: 100
//                ,layout: ['prev', 'page', 'next', 'skip' ,'count']
//                ,prev: '<em>←</em>'
//                ,next: '<em>→</em>'
//                ,jump: function(obj){
//                    console.log(obj)
//                }
//            });
//        时间选择
            //日期时间选择器
            laydate.render({
                elem: '#time'
                ,type: 'datetime'
            });
            laydate.render({
                elem: '#timeTwo'
                ,type: 'datetime'
            });
        });
    </script>
    <hook name="before_body_end"/>
</body>
</html>